@extends('admin.main')
@section('content')
    <div class="daohang">
        <ul>
            <li>
                <button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 设置管理</button>
            </li>
        </ul>
    </div>
    <div class="admin-biaogelist">

        <div class="listbiaoti am-cf">
            <ul class="am-icon-flag on"> 设置信息 </ul>
        </div>

        <div class="am-tabs am-margin" data-am-tabs>
            <ul class="am-tabs-nav am-nav am-nav-tabs">
                <li @if($type == 1)class="am-active" @endif ><a href="#tab1">会员优惠设置</a></li>
                <li @if($type == 2)class="am-active" @endif ><a href="#tab2">改签时间设置</a></li>
                <li @if($type == 3)class="am-active" @endif ><a href="#tab3">公众号设置</a></li>
                <li @if($type == 4)class="am-active" @endif ><a href="#tab4">微信支付设置</a></li>
                <li @if($type == 5)class="am-active" @endif ><a href="#tab5">银联支付设置</a></li>
                <li @if($type == 6)class="am-active" @endif ><a href="#tab6">短信设置</a></li>
            </ul>
            <div class="am-tabs-bd">
                <div class="am-tab-panel am-fade @if($type == 1)am-active am-in @endif" id="tab1">
                    <form class="am-form" method="post">
                        <div class="xitong">
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">普通用户：</div>
                                <div class="you" style="max-width: 500px;">
                                    充值低于 <input style="width: 50px;display: inline-block" type="text" class="am-input-sm"  name="level1" value="{{isset($rows['promotion']['level1']) ? $rows['promotion']['level1'] : 0}}">
                                     元，无优惠
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">普通会员：</div>
                                <div class="you" style="max-width: 800px;">
                                    充值大于等于 <input style="width: 50px;display: inline-block" type="text" class="am-input-sm"  name="level2[]" value="{{isset($rows['promotion']['level2'][0]) ? $rows['promotion']['level2'][0] : 0}}">
                                    元，低于 <input style="width: 50px;display: inline-block" type="text"  name="level2[]" class="am-input-sm"  value="{{isset($rows['promotion']['level2'][1]) ? $rows['promotion']['level2'][1] : 0}}">
                                    元，享挂号优惠：主任200，副主任150，主治 50
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">家庭会员：</div>
                                <div class="you" style="max-width: 800px;">
                                    充值大于等于 <input style="width: 50px;display: inline-block" type="text" name="level3[]" class="am-input-sm"  value="{{isset($rows['promotion']['level3'][0]) ? $rows['promotion']['level3'][0] : 0}}">
                                    元，低于 <input style="width: 50px;display: inline-block" type="text" name="level3[]" class="am-input-sm"  value="{{isset($rows['promotion']['level3'][1]) ? $rows['promotion']['level3'][1] : 0}}">
                                    元，享挂号优惠：主任200，副主任150，主治 50
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo"></div>
                                <div class="you" style="margin-top: 4px;">
                                    <input type="hidden" name="type" value="1">
                                    <button type="submit" class="am-btn am-btn-success  am-radius am-btn-sm">保存</button>
                                </div>
                            </div>


                        </div>


                    </form>
                </div>
                <div class="am-tab-panel am-fade @if($type == 2)am-active am-in @endif" id="tab2">
                    <form class="am-form" method="post">
                        <div class="xitong">
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right; width: 13%;">预约时间到期前：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 50px;display: inline-block" type="text" class="am-input-sm"  name="end_appointment_time" value="{{$rows['system']['end_appointment_time'] or 12}}">
                                    小时
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;width: 13%;">预约支付时效时间：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 50px;display: inline-block" type="text" class="am-input-sm"  name="end_pay_time" value="{{$rows['system']['end_pay_time'] or 15}}">
                                    分钟
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo"></div>
                                <div class="you" style="margin-top: 4px;">
                                    <input type="hidden" name="type" value="2">
                                    <button type="submit" class="am-btn am-btn-success  am-radius am-btn-sm">保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="am-tab-panel am-fade @if($type == 3)am-active am-in @endif" id="tab3">
                    <form class="am-form" method="post">
                        <div class="xitong">
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">app_id：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="app_id" value="{{$rows['wechat']['app_id']}}">
                                    微信公众号appid
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">app_secret：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="app_secret" value="{{$rows['wechat']['app_secret']}}">
                                    微信公众号appsecret
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">token：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="token" value="{{$rows['wechat']['token']}}">
                                    微信公众号token
                                </div>
                            </div>
                            <div class="am-form-group am-cf">
                                <div class="zuo" style="text-align: right;">accesstoken：</div>
                                <div class="you"style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="accesstoken" value="{{$rows['wechat']['accesstoken']}}">
                                    accesstoken
                                </div>
                            </div>
                            <div class="am-form-group am-cf">
                                <div class="zuo" style="text-align: right;">accessexpire：</div>
                                <div class="you"style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="accessexpire" value="{{$rows['wechat']['accessexpire']}}">
                                    accesse过期时间
                                </div>
                            </div>
                            <div class="am-form-group am-cf">
                                <div class="zuo" style="text-align: right;">jsexpire：</div>
                                <div class="you"style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="jsexpire" value="{{$rows['wechat']['jsexpire']}}">
                                    js过期时间
                                </div>
                            </div>
                            <div class="am-form-group am-cf">
                                <div class="zuo" style="text-align: right;">jsticket：</div>
                                <div class="you"style="max-width: 500px;">
                                    <input style="width: 200px;display: inline-block" type="text" class="am-input-sm"  name="jsticket" value="{{$rows['wechat']['jsticket']}}">
                                    jsticket
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo"></div>
                                <div class="you" style="margin-top: 4px;">
                                    <input type="hidden" name="type" value="3">
                                    <button type="submit" class="am-btn am-btn-success  am-radius am-btn-sm">保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="am-tab-panel am-fade @if($type == 4)am-active am-in @endif" id="tab4">
                    <form class="am-form" method="post">
                        <div class="xitong">
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">mch_id：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="mch_id" value="{{$rows['wechat']['mch_id']}}">
                                    微信支付商户号
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">mch_key：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="mch_key" value="{{$rows['wechat']['mch_key']}}">
                                    微信支付密钥
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo"></div>
                                <div class="you" style="margin-top: 4px;">
                                    <input type="hidden" name="type" value="4">
                                    <button type="submit" class="am-btn am-btn-success  am-radius am-btn-sm">保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="am-tab-panel am-fade @if($type == 5)am-active am-in @endif" id="tab5">
                    <form class="am-form" method="post" enctype="multipart/form-data">
                        <div class="xitong">
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">mer_id：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="mer_id" value="{{$rows['union']['mer_id']}}">
                                    银联支付商户号
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">cert_password：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="cert_password" value="{{$rows['union']['cert_password']}}">
                                    银联支付密码
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">cert_path：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="file" class="am-input-sm"  name="cert_path" value="{{$rows['union']['cert_path']}}">
                                    商户私钥证书
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo"></div>
                                <div class="you" style="margin-top: 4px;">
                                    <input type="hidden" name="type" value="5">
                                    <button type="submit" class="am-btn am-btn-success  am-radius am-btn-sm">保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="am-tab-panel am-fade @if($type == 6)am-active am-in @endif" id="tab6">
                    <form class="am-form" method="post">
                        <div class="xitong">
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">短信服务商：</div>
                                <div class="you" style="max-width: 800px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm" readonly  value="容联云通讯">
                                    服务商地址：http://www.yuntongxun.com/
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">accountSid：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="account_sid" value="{{$rows['sms']['account_sid']}}">
                                    主帐号
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">accountToken：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="account_token" value="{{$rows['sms']['account_token']}}">
                                    主帐号Token
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">appId：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="app_id" value="{{$rows['sms']['app_id']}}">
                                    应用Id
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">serverIP：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="server_ip" value="{{$rows['sms']['server_ip']}}">
                                    请求地址，格式如下，不需要写https://
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">serverPort：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="server_port" value="{{$rows['sms']['server_port']}}">
                                    请求端口
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="zuo" style="text-align: right;">softVersion：</div>
                                <div class="you" style="max-width: 500px;">
                                    <input style="width: 250px;display: inline-block" type="text" class="am-input-sm"  name="soft_version" value="{{$rows['sms']['soft_version']}}">
                                    REST版本号
                                </div>
                            </div>

                            <div class="am-form-group">
                                <div class="zuo"></div>
                                <div class="you" style="margin-top: 4px;">
                                    <input type="hidden" name="type" value="5">
                                    <button type="submit" class="am-btn am-btn-success  am-radius am-btn-sm">保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            @include('admin.footer')
            @section('script')
                <script>
                    var message = "{{Session::get('message')}}";
                    $(window).ready(function () {
                        if (message) {
                            layer.msg(message, {
                                time: 3000 //2秒关闭（如果不配置，默认是3秒）
                            });
                        }
                    });
                </script>
            @endsection
        </div>
    </div>
@endsection